<?php echo form_open($this->curl . '/create/'.$this->validation->id, 'id="myform" name="myform" autocomplete="off"')?>
<?php echo form_hidden('id', $this->validation->id)?>
<br />
<table class="nostyle" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
	<td>
		<?php echo $this->validation->error_string?>
		<table class="nostyle forma" width="100%" border="0" cellpadding="3" cellspacing="0">
		<tr>
			<th style="width: 180px;"><?php $this->load->view('_elements/obligatory');?><?php echo $this->admin_model->fields['first_name']?></th>
			<td><div class="input_300"><?php echo form_input('first_name', $this->validation->first_name, 'class="input-text"')?></div></td>
		</tr>
		<tr>
			<th><?php $this->load->view('_elements/obligatory');?><?php echo $this->admin_model->fields['last_name']?></th>
			<td><div class="input_300"><?php echo form_input('last_name', $this->validation->last_name, 'class="input-text"')?></div></td>
		</tr>
		<tr>
			<th><?php $this->load->view('_elements/obligatory');?><?php echo $this->admin_model->fields['email']?></th>
			<td><div class="input_300"><?php echo form_input('email', $this->validation->email, 'class="input-text"')?></div></td>
		</tr>
		<tr>
			<th><?php $this->load->view('_elements/obligatory');?><?php echo $this->admin_model->fields['password']?></th>
			<td><div class="input_300"><?php echo form_password('password', $this->validation->password, 'class="input-text"')?></div></td>
		</tr>
		<tr>
			<th><?php $this->load->view('_elements/obligatory');?><?php echo $this->admin_model->fields['password_confirm']?></th>
			<td><div class="input_300"><?php echo form_password('password_confirm', $this->validation->password_confirm, 'class="input-text"')?></div></td>
		</tr>
		<tr>
			<th><?php $this->load->view('_elements/obligatory');?><?php echo $this->admin_model->fields['status']?></th>
			<td><div class="input_300"><?php echo form_dropdown('status', $this->admin_model->status, array($this->validation->status), null, TRUE)?></div></td>
		</tr>
		<?php if ($role == USER_ROLE_SUPERADMIN): ?>
		<tr>
			<th><?php $this->load->view('_elements/obligatory');?><?php echo $this->admin_model->fields['id_acl_roles']?></th>
			<td><div class="input_300"><?php echo form_dropdown('id_acl_roles', array(ROLE_SUPERADMIN => USER_ROLE_SUPERADMIN, ROLE_ADMIN => USER_ROLE_ADMIN), array($this->validation->id_acl_roles), null, TRUE)?></div></td>
		</tr>
		<?php endif; ?>
		<!-- 
		<tr>
			<th><?php echo T_('User Roles'); ?></th>
			<td>
				<?php
				/*
					if (!empty($roles))
					{
						foreach($roles as $id => $role)
						{
							$checked = (in_array($id, $user_roles)) ? TRUE : FALSE;
							echo form_checkbox('id_roles[]', $id, $checked, 'id="rb'. $id.'"') . ' ' . $role . '<br />';
						}
					} 
				*/
				?>
			</td>
		</tr>
		-->		
		<tr>
			<td colspan="2">&nbsp;</td>
		</tr>
		<tr>
			<td></td>
			<td>			
				<input name="edit" type="submit" class="btn btn_save" id="submit" value="<?php echo T_('Submit')?>" />
				<input name="reset"  type="reset"  class="btn btn_clear" id="reset" value="<?php echo T_('Reset')?>" onclick="$('#create_form input[type=text]').val('');" />
			</td>
		</tr>
		</table>
	</td>
</tr>
</table>

<?php echo form_close()?>